#define LOG_TAG "vendor.lyzr.hardware.lytest@1.0"
#include <log/log.h>
#include "LyTest.h"

namespace vendor {
namespace lyzr {
namespace hardware {
namespace lytest {
namespace V1_0 {
namespace implementation {

sp<ILyTestCallback> LyTest::mCallback = nullptr;

// Methods from ::vendor::lyzr::hardware::lytest::V1_0::ILyTest follow.
Return<void> LyTest::test() {
    ALOGD("LyTest::test()");
    if (mCallback != nullptr)
    {
        mCallback->onNotify(123);
    }
    return Void();
}

Return<void> LyTest::setCallback(const sp<::vendor::lyzr::hardware::lytest::V1_0::ILyTestCallback>& callback) {
    // TODO implement
    if (callback != nullptr)
    {
        mCallback = callback;
    }
    return Void();
}

// Methods from ::android::hidl::base::V1_0::IBase follow.

//ILyTest* HIDL_FETCH_ILyTest(const char* /* name */) {
    //return new LyTest();
//}
//
}  // namespace implementation
}  // namespace V1_0
}  // namespace lytest
}  // namespace hardware
}  // namespace lyzr
}  // namespace vendor
